<h1>Edit User</h1>

<div class="form">
  <%= error_messages_for :user -%>

  <fieldset>
  <legend>Edit User Details</legend>
  <% form_for :user, :url => { :action => "update", 
                               :id     => @user.id } do |form| %>
    <div>
      <%= form.label :name %>:<br />
      <%= form.text_field :user_name, :size => 35, :class => "text" %>
    </div>
    <div>
      <%= form.label :email %>:<br />
      <%= form.text_field :user_email, :size => 35, :class => "text" %>
    </div>
    <div>
      <%= form.label :profile %>:<br />
      <%= form.text_area :profile, :rows => 4, :class => "text" %>
    </div>
   <% if admin? %>
    <div>
      Administrator: 
      <%= form.radio_button :user_admin, true, :class => "radio" %> <!-- <label id="code.rails_app.layout_users.13"/> -->
      <label for="user_admin_true">Yes</label>
      <%= form.radio_button :user_admin, false, :class => "radio" %>
      <label for="user_admin_false">No</label>
    </div>
  <% end %>

    <%= submit_tag "Save", :class => "submit" %> &nbsp;
    <%= link_to "cancel", :action => "index" %>
  <% end %>
  </fieldset>
</div>
